using System;
using System.Collections.Generic;
using System.IO;

namespace resx_utils
{

	public class resxdiff
	{

		public static void Main(string[] args)
		{
			// check for valid arguments
			if (args.Length != 2)
			{
				Console.WriteLine("resxdiff file1 file2 - Compare two .resx files");
				return;
			}

			// get filenames
			string resx1File = args[0];
			string resx2File = args[1];

			// check files
            if (Utils.VerifyExistance(resx1File) && Utils.VerifyExistance(resx2File))
			{
                SortedDictionary<String, Object> nodes1 = Utils.CreateSortedDictionary(resx1File);
                SortedDictionary<String, Object> nodes2 = Utils.CreateSortedDictionary(resx2File);
                Utils.Compare(nodes1, nodes2);
			}
		}

	}

}
